home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-11
/
clipscrl.zip
/
SCRL&PAN.PRG
< prev
Wrap
Text File
|
1993-01-04
|
3KB
|
94 lines
*=============================================================================
*
* Filename: SCRL&PAN.PRG
* Author..: Tim Shriver; Softech International, Inc. (301) 890-4054
* Address.: 14241 Ballinger Terrace
* Laurel, MD 20707
* Date....: November 18, 1986
* Notice..: This program is donated as Shareware. Scrl&Pan works and I'm
* sure it could be written better. I am not an assembly programmer
* and would like to here any suggestions for improving the code.
* If you find these routines to be helpful please send $5.00 to
* the address shown above. Look for other clipper utilities on this
* BBS from Softech in the near future. Thank you for your support.
* Notes...: These functions are already compiled, simply plink86 or link the
* two files SCRL&PAN.OBJ and CLIPSCRL.OBJ.
*
* Syntax: SCRLUP or DOWN (<expN1>,<expN2>,<expN3>,<expN4>,<expN5>,<expN6>)
* Parms : expN1: Number of lines to scroll up or down
* expN2: Row of upper left corner of scroll
* expN3: Col of upper left corner of scroll
* expN4: Row of lower right corner of scroll
* expN5: Col of lower right corner of scroll
* expN6: Attribute to be used on blank lines at bottom of scroll
clear
external SCRLUP, SCRLDOWN
* create and init the blank area which is appears on the sides after a pan
nullarea = ''
for x = 1 to 10
nullarea = nullarea + chr(32) + chr(7)
next
* fill the screen with test data for demo
for x = 0 to 22
for y = 1 to 79
?? chr(y+x+33)
next
?
next
* begin demo loop
q1 = 1
do while q1 <> 5
@ 24,10 prompt 'Left'
@ 24,20 prompt 'Right'
@ 24,30 prompt 'Up'
@ 24,40 prompt 'Down'
@ 24,50 prompt 'Quit'
* lines to scroll
n1 = 1
* coordinate of window to scroll
n2 = 5
n3 = 5
n4 = 18
n5 = 75
* attribute of new line
n6 = 7
* get user option
menu to q1
do case
case q1 = 1
* pan left
save screen to oldscreen
* init newscreen mem var
newscreen = ''
* load newscreen with line portion of screen to be shifted + nullarea
* only 23 lines so we do not disturb the prompts at bottom of screen
for x = 1 to 23
temp = ((x-1) * 160) + 21
* time intensive routine, needs to be recoded in assembler or C
newscreen = newscreen + substr(oldscreen,temp,140) + nullarea
next
* load remaining bottom of screen as is into newscreen
newscreen = newscreen + substr(oldscreen,3681,320)
* display new screen
restore screen from newscreen
case q1 = 2
* pan right
save screen to oldscreen
newscreen = ''
for x = 1 to 23
temp = ((x-1) * 160) + 1
newscreen = newscreen + nullarea + substr(oldscreen,temp,140)
next
newscreen = newscreen + substr(oldscreen,3681,320)
restore screen from newscreen
case q1 = 3
* scroll up
do SCRLUP with n1,n2,n3,n4,n5,n6
case q1 = 4
* scroll down
do SCRLDOWN with n1,n2,n3,n4,n5,n6
endcase
enddo
release all
quit